<li style="width:30%">
      <div class="table-responsive div1 div_search">                          
            <table class="table table-th-block table-hover">                                
                 <thead>
                       <tr>                                        
                             <th colspan=2>楼层列表</th>
                       </tr>                           
                 </thead>
                 <tbody>
                       <foreach name="floor" item="value">                                 
                         <tr>
                              <td class="{$value.floor_id}">{$value.floor_name}</td>
                              <td style="width:100px;text-align:center" name="{$value.floor_id}">
                              <a class="savef" name="{$value.building_id}">修改</a>/
                              <a href="javascript:void(0)" onclick="to_del(3,{$value.floor_id})">删除</a></td>
                         </tr>
                       </foreach>
                 </tbody>
            </table>
            <ul class="pagination success">{$rs.show}</ul>
      </div>                    
</li>

<script>
//楼层修改
$(".savef").click(function(){
      var local_id = city_id;      
      var floor_id =$(this).parent().prev().attr("class");     
      var floor_name =$(this).parent().prev().text();
      var building_id = $(this).attr("name");      
      $.ajax({
        url:"__URL__/build_floor",
        data:{"local_id":local_id},
        type:"post",
        success:function(data){
          $(".build_floor").html(data);
          $(".build_floor option[value='"+building_id+"']").attr("selected","selected");
        }
      });      
      $(".city_check option[value="+local_id+"]").attr("selected","selected");
      
      $("#floor_id").val(floor_id);
      $("#floor_name").val(floor_name);     
      $(".back").css({display:"block"});
      $(".update_floor").css({display:"block"});
});
//楼层修改城市选择

</script>
